package com.shop.resource.controller;

import com.shop.resource.api.IEmailApi;
import com.shop.resource.service.IEmailService;
import com.teemor.common.bean.model.EmailModel;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @Description:
 *
 * @author zhoulk
 * @date: 2019年05月08日  17:32
 */

@RestController
public class EmailController implements IEmailApi {

    private static final Logger logger = LoggerFactory.getLogger(EmailController.class);

    @Autowired
    IEmailService emailService;

    @Override
    public void sendEmail(@RequestBody EmailModel emailModel) {
        logger.info("发送邮件：【EmailData】 " + emailModel.toString());
        emailService.sendEmail(emailModel);
    }
}
